import { createMemoryHistory, createRouter } from 'vue-router'

const routes = [
  { path: '/', component: () => import('./views/index.vue') , redirect: '/a1'},
  { path: '/a1', component: () => import('./views/a1.vue'), name: '拦截浏览器返回' },
  { path: '/a2', component: () => import('./views/a2.vue'), name: 'js控制element的弹窗' },
]

const router = createRouter({
  history: createMemoryHistory(),
  routes,
})

export default router